import request from 'utils/request'

export const getArticleLsit = (params) => {
    return request({
        url: '/v1_0/mp/articles',
        params
    })
}

export const delArticleLsit = (id) => {
    return request({
        url: `/v1_0/mp/articles/${id}`,
        method:'DELETE'
    })
}

export const publishArticleLsit = (data, draft = false) => {
    return request({
        url:`/v1_0/mp/articles?draft=${draft}`,
        method: 'POST',
        data
    })
}

export const getArticleListAPI = (id) => {
    return request({
        url:`/v1_0/mp/articles/${id}`
    })
}


export const uploadArticleLsitId = (id,data, draft = false) => {
    return request({
        url:`/v1_0/mp/articles/${id}?draft=${draft}`,
        method: 'PUT',
        data
    })
}